/*
 *  Key.cpp
 *  lab3
 *
 *  Created by Fredrik Gustafsson on 2010-11-26.
 *  Copyright 2010 KTH. All rights reserved.
 *
 */

#include "Key.h"

using namespace wok2;

std::string Key::type() const{
	return "key";
}

Key::Key(const Key& j) : Item(j.name, j.description), opens(j.opens) {}

Key::Key(std::string name, std::string desc, Environment* env) : Item(name, desc), opens(env) {}

std::ostream& Key::write_nongeneric(std::ostream& os) const {
	os << opens->name << std::endl;
	return os;
}